<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/9
 * Time: 20:56
 */

namespace app\api\controller\v1;

use app\lib\exception\ParamersException;

class Pay extends BaseController
{
    protected $beforeActionList = [
        'needExclusiveScope' => ['only' => 'getPreOrder'],
    ];
    //定义一个获取定单的方法
    public function getPreOrder($id = '')
    {
        $validate = Validate('IdCollection') -> check(['id' => $id]);
        if(!$validate) throw new ParamersException(['msg' => '参数错误！']);
    }
}